<?php
namespace App\Repositories;

use App\Exceptions\BasicException;
use Illuminate\Support\Facades\Hash;


class WinLogRepository
{
    /**
     * 获取中奖列表
     * @param $where
     * @param $page
     * @param $perPage
     * @return bool
     */
    public function winGiftList($where=[],$perPage=10,$page=1)
    {
            $giftList =  app('model_win_log')
                ->setUnionAllTable()
                ->where($where)
                ->orderBy('id','desc')
                ->with(['user_data:user_id,user_code,nickname','gift:id,name,price,picture'])
                ->paginate($perPage, ['*'], '', $page);
            return $giftList;
    }
}


?>